home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / LIB211.ZIP;1 / ISDISK.TXT < prev    next >
Encoding:
Text File  |  1993-12-15  |  1.4 KB  |  47 lines

  1. IsDisk.TXT (Taken from the ISDISK.ASM file)
  2. by Kenneth Chan  CIS:72662,1305
  3.  
  4. NOTE: ISDISK.ZIP in the DBASE forum on CompuServe (Library 4)
  5. contains the .ASM source code for this .BIN file.
  6.  
  7. Based on DISK.ASM/DISK.BIN by Kenneth N. Getz (no relation)
  8.  
  9. Diskette checker.  Detects whether a formatted diskette is in the 
  10. diskette drive, and if it is write-protected.
  11.  
  12. Usage
  13. -----
  14. In dBASE IV, after LOADing, use the CALL() function.  The expression
  15.  
  16. call( "ISDISK", "A" )   or
  17. call( "ISDISK", "B" )
  18.  
  19. will return one of three things:
  20.  
  21. (1) The drive letter ("A" or "B") that was checked, if the disk is OK
  22. (2) A "W" if the disk is OK, but write-protected
  23. (3) A "X" if the disk or drive is not OK
  24.  
  25. This .BIN should also work with dBASE III, although it has not been
  26. tested there; the CALL command must be used since dBASE III does not
  27. have the CALL() function.
  28.  
  29. To use the CALL command, you need to initialize a memvar and pass that
  30. WITH the CALL, e.g.
  31.  
  32.    cDrive = "A"
  33.    call ISDISK with cDrive
  34.  
  35. cDrive will then contain "A", "W", or "X".  This also works in dBASE IV.
  36.  
  37. IsDisk works by reading the second sector of the diskette and writing it
  38. back to the disk.  This avoids writing to the first sector, the boot
  39. sector, which would cause anti-virus TSRs to get suspicious.
  40.  
  41. This program is hereby placed in the public domain.  No warranties are
  42. expressed or implied.  USE AT YOUR OWN RISK!
  43.  
  44. --------
  45. 12/02/93  v1.0
  46.  
  47.